luci-mod-network: add arry destructuring in render function
authorChristian Korber <[email protected]>
Wed, 10 Sep 2025 06:31:55 +0000 (08:31 +0200)
committerPaul Donald <[email protected]>
Thu, 25 Sep 2025 11:25:33 +0000 (13:25 +0200)
This change is more elegant in comparison to the previous version.

Signed-off-by: Christian Korber <[email protected]>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js

index 2e897ac0097f826b53e652c1213529935e85fba7..469210603c73087989f780cf226da721dd5e98cc 100644 (file)
@@ -304,13 +304,8 @@ return view.extend({
                });
        },
 
-       render: function(hosts_duids_pools) {
+       render: function([hosts, duids, pools, networks, macdata]) {
                var has_dhcpv6 = L.hasSystemFeature('dnsmasq', 'dhcpv6') || L.hasSystemFeature('odhcpd'),
-                   hosts = hosts_duids_pools[0],
-                   duids = hosts_duids_pools[1],
-                   pools = hosts_duids_pools[2],
-                   networks = hosts_duids_pools[3],
-                   macdata = hosts_duids_pools[4],
                    m, s, o, ss, so, dnss;
 
                let noi18nstrings = {